#include "rect_container.h"

namespace congruent_packing
{	

rect_container_t::rect_container_t()
	: width(1.0)
	, height(1.0)
{}
	
void rect_container_t::clamp_point(PointF & v)
{
	if (v.x > width)
	{
		v.x = width;
	}

	if (v.x < 0.0)
	{
		v.x = 0.0;
	}

	if (v.y > height)
	{
		v.y = height;
	}

	if (v.y < 0.0)
	{
		v.y = 0.0;
	}
}

}